/*
 * Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
 * 
 * This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
 * printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
 * without the written permission of iTAC Software AG.
 */
package org.template.portal;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author rafal.kojta
 */
@Entity
@Table(name = "faculty")
public class Faculty {

  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "FACULTY_ID", unique = true, nullable = false)
  private long facultyId;

  @OneToMany(fetch = FetchType.LAZY, mappedBy = "faculty")
  private Set<Course> courses;

  @Column(name = "NAME")
  private String name;

  @Column(name = "WEB_ADDRESS")
  private String webAddress;

  public Faculty() {
  }

  public long getFacultyId() {
    return facultyId;
  }

  public void setFacultyId(long facultyId) {
    this.facultyId = facultyId;
  }

  public Set<Course> getCourses() {
    return courses;
  }

  public void setCourses(Set<Course> courses) {
    this.courses = courses;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getWebAddress() {
    return webAddress;
  }

  public void setWebAddress(String webAddress) {
    this.webAddress = webAddress;
  }

}
